package Case;

public class demo1_1 {
    public static String myToString(int[] array){
        String ref = "[";
        for (int i = 0; i < array.length; i++) {
            ref += array[i];
            if (i != array.length-1) {
                ref += ",";
            }
        }
        ref += "]";
        return ref;
    }
    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5};
        System.out.println(myToString(array));
    }

}
